using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class FunctionSwitch : GeneratedMessageLite<FunctionSwitch, FunctionSwitch.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<FunctionSwitch, FunctionSwitch.Builder>
		{
			private bool resultIsReadOnly;
			private FunctionSwitch result;
			protected override FunctionSwitch.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override FunctionSwitch MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override FunctionSwitch DefaultInstanceForType
			{
				get
				{
					return FunctionSwitch.DefaultInstance;
				}
			}
			public uint FunctionId
			{
				get
				{
					return this.result.FunctionId;
				}
				set
				{
					this.SetFunctionId(value);
				}
			}
			public uint SwitchValue
			{
				get
				{
					return this.result.SwitchValue;
				}
				set
				{
					this.SetSwitchValue(value);
				}
			}
			public Builder()
			{
				this.result = FunctionSwitch.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(FunctionSwitch cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private FunctionSwitch PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					FunctionSwitch other = this.result;
					this.result = new FunctionSwitch();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override FunctionSwitch.Builder Clear()
			{
				this.result = FunctionSwitch.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override FunctionSwitch.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new FunctionSwitch.Builder(this.result);
				}
				return new FunctionSwitch.Builder().MergeFrom(this.result);
			}
			public override FunctionSwitch BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override FunctionSwitch.Builder MergeFrom(IMessageLite other)
			{
				if (other is FunctionSwitch)
				{
					return this.MergeFrom((FunctionSwitch)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override FunctionSwitch.Builder MergeFrom(FunctionSwitch other)
			{
				return this;
			}
			public override FunctionSwitch.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override FunctionSwitch.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(FunctionSwitch._functionSwitchFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = FunctionSwitch._functionSwitchFieldTags[num2];
					}
					uint num3 = num;
					if (num3 == 0u)
					{
						throw InvalidProtocolBufferException.InvalidTag();
					}
					if (num3 != 8u)
					{
						if (num3 != 16u)
						{
							if (WireFormat.IsEndGroupTag(num))
							{
								return this;
							}
							this.ParseUnknownField(input, extensionRegistry, num, text);
						}
						else
						{
							this.result.hasSwitchValue = input.ReadUInt32(ref this.result.switchValue_);
						}
					}
					else
					{
						this.result.hasFunctionId = input.ReadUInt32(ref this.result.functionId_);
					}
				}
				return this;
			}
			public FunctionSwitch.Builder SetFunctionId(uint value)
			{
				this.PrepareBuilder();
				this.result.hasFunctionId = true;
				this.result.functionId_ = value;
				return this;
			}
			public FunctionSwitch.Builder ClearFunctionId()
			{
				this.PrepareBuilder();
				this.result.hasFunctionId = false;
				this.result.functionId_ = 0u;
				return this;
			}
			public FunctionSwitch.Builder SetSwitchValue(uint value)
			{
				this.PrepareBuilder();
				this.result.hasSwitchValue = true;
				this.result.switchValue_ = value;
				return this;
			}
			public FunctionSwitch.Builder ClearSwitchValue()
			{
				this.PrepareBuilder();
				this.result.hasSwitchValue = false;
				this.result.switchValue_ = 0u;
				return this;
			}
		}
		public const int FunctionIdFieldNumber = 1;
		public const int SwitchValueFieldNumber = 2;
		private static readonly FunctionSwitch defaultInstance;
		private static readonly string[] _functionSwitchFieldNames;
		private static readonly uint[] _functionSwitchFieldTags;
		private bool hasFunctionId;
		private uint functionId_;
		private bool hasSwitchValue;
		private uint switchValue_;
		private int memoizedSerializedSize = -1;
		public static FunctionSwitch DefaultInstance
		{
			get
			{
				return FunctionSwitch.defaultInstance;
			}
		}
		public override FunctionSwitch DefaultInstanceForType
		{
			get
			{
				return FunctionSwitch.DefaultInstance;
			}
		}
		protected override FunctionSwitch ThisMessage
		{
			get
			{
				return this;
			}
		}
		public uint FunctionId
		{
			get
			{
				return this.functionId_;
			}
		}
		public uint SwitchValue
		{
			get
			{
				return this.switchValue_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasFunctionId && this.hasSwitchValue;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasFunctionId)
				{
					num += CodedOutputStream.ComputeUInt32Size(1, this.FunctionId);
				}
				if (this.hasSwitchValue)
				{
					num += CodedOutputStream.ComputeUInt32Size(2, this.SwitchValue);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private FunctionSwitch()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] functionSwitchFieldNames = FunctionSwitch._functionSwitchFieldNames;
			if (this.hasFunctionId)
			{
				output.WriteUInt32(1, functionSwitchFieldNames[0], this.FunctionId);
			}
			if (this.hasSwitchValue)
			{
				output.WriteUInt32(2, functionSwitchFieldNames[1], this.SwitchValue);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasFunctionId)
			{
				num ^= this.functionId_.GetHashCode();
			}
			if (this.hasSwitchValue)
			{
				num ^= this.switchValue_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			FunctionSwitch functionSwitch = value as FunctionSwitch;
			return functionSwitch != null && (this.hasFunctionId == functionSwitch.hasFunctionId && (!this.hasFunctionId || this.functionId_.Equals(functionSwitch.functionId_))) && (this.hasSwitchValue == functionSwitch.hasSwitchValue && (!this.hasSwitchValue || this.switchValue_.Equals(functionSwitch.switchValue_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<FunctionSwitch, FunctionSwitch.Builder>.PrintField("FunctionId", this.hasFunctionId, this.functionId_, writer);
			GeneratedMessageLite<FunctionSwitch, FunctionSwitch.Builder>.PrintField("SwitchValue", this.hasSwitchValue, this.switchValue_, writer);
		}
		public static FunctionSwitch ParseFrom(byte[] data)
		{
			return FunctionSwitch.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private FunctionSwitch MakeReadOnly()
		{
			return this;
		}
		public static FunctionSwitch.Builder CreateBuilder()
		{
			return new FunctionSwitch.Builder();
		}
		public override FunctionSwitch.Builder ToBuilder()
		{
			return FunctionSwitch.CreateBuilder(this);
		}
		public override FunctionSwitch.Builder CreateBuilderForType()
		{
			return new FunctionSwitch.Builder();
		}
		public static FunctionSwitch.Builder CreateBuilder(FunctionSwitch prototype)
		{
			return new FunctionSwitch.Builder(prototype);
		}
		static FunctionSwitch()
		{
			FunctionSwitch.defaultInstance = new FunctionSwitch().MakeReadOnly();
			FunctionSwitch._functionSwitchFieldNames = new string[]
			{
				"FunctionId",
				"SwitchValue"
			};
			FunctionSwitch._functionSwitchFieldTags = new uint[]
			{
				8u,
				16u
			};
			object.ReferenceEquals(micromsg.Proto.FunctionSwitch.Descriptor, null);
		}
	}
}
